import request from "@/util/request.js"
// 按省级获取设备数量
export function getDeviceDetails(param) {
	return request({
		url: '/iot/device/details',
		method: 'post',
		data: param
	})
}

export function listDeviceBindChildDevice(param) {
	return request({
		url: '/iot/device/bind/listChildDevice',
		method: 'post',
		data: param
	})
}

export function updateDeviceInfo(param) {
	return request({
		url: '/iot/device/update',
		method: 'post',
		data: param
	})
}

export function refreshStatus(param) {
	return request({
		url: '/iot/device/getStatus',
		method: 'post',
		data: param
	})
}

export function setEnable(param) {
	return request({
		url: '/iot/device/setEnable',
		method: 'post',
		data: param
	})
}

export function bindDeviceUser(param) {
	return request({
		url: '/iot/device/bindUser',
		method: 'post',
		data: param
	})
}

export function listAllDevice(param) {
	return request({
		url: '/iot/device/listAll',
		method: 'post',
		data: param
	})
}

export function listCompanyDevice(param) {
	return request({
		url: '/iot/device/listByCompany',
		method: 'post',
		data: param
	})
}

export function listDeptDevice(param) {
	return request({
		url: '/iot/device/listByDept',
		method: 'post',
		data: param
	})
}

export function listAllDeviceGEO(param) {
	return request({
		url: '/iot/device/listAllGEO',
		method: 'post',
		data: param
	})
}

export function listCompanyDeviceGEO(param) {
	return request({
		url: '/iot/device/listByCompanyGEO',
		method: 'post',
		data: param
	})
}

export function listDeptDeviceGEO(param) {
	return request({
		url: '/iot/device/listByDeptGEO',
		method: 'post',
		data: param
	})
}


export function pageGetAllDevice(param) {
	return request({
		url: '/iot/device/pageGetAll',
		method: 'post',
		data: param
	})
}

export function pageGetCompanyDevice(param) {
	return request({
		url: '/iot/device/pageGetByCompany',
		method: 'post',
		data: param
	})
}

export function pageGetDeptDevice(param) {
	return request({
		url: '/iot/device/pageGetByDept',
		method: 'post',
		data: param
	})
}

// 按省级获取设备数量
export function listProvinceNumAll(param) {
	return request({
		url: '/iot/device/provinceNumAll',
		method: 'post',
		data: param
	})
}

// 按城市获取设备数量
export function listCityNumAll(param) {
	return request({
		url: '/iot/device/cityNumAll',
		method: 'post',
		data: param
	})
}

// 按省级获取设备数量
export function listProvinceNumByCompany(param) {
	return request({
		url: '/iot/device/provinceNumByCompany',
		method: 'post',
		data: param
	})
}

// 按城市获取设备数量
export function listCityNumByCompany(param) {
	return request({
		url: '/iot/device/cityNumByCompany',
		method: 'post',
		data: param
	})
}

// 按省级获取设备数量
export function listProvinceNumByDept(param) {
	return request({
		url: '/iot/device/provinceNumByDept',
		method: 'post',
		data: param
	})
}

// 按城市获取设备数量
export function listCityNumByDept(param) {
	return request({
		url: '/iot/device/cityNumByDept',
		method: 'post',
		data: param
	})
}

export function listStatusCountAll(param) {
	return request({
		url: '/iot/device/statusNumAll',
		method: 'post',
		data: param
	})
}

export function listStatusCountByCompany(param) {
	return request({
		url: '/iot/device/statusNumByCompany',
		method: 'post',
		data: param
	})
}

export function listStatusCountByDept(param) {
	return request({
		url: '/iot/device/statusNumByDept',
		method: 'post',
		data: param
	})
}
